<?php

require_once("UserComment.php");

class UserPost {
	
	/**
	 * @var integer
	 */
	private $postId;
	private $userId;
	
	/**
	 * @var string
	 */
	private $username;
	private $imageString;
	private $comment;
	private $dateString;
	
	/**
	 * @var array $commentList UserComment
	 */
	private $commentList;
	
	public function __construct($postId, $userId, $username, $imageString,
								$comment, $dateString) {
		$this->postId = $postId + 0;
		$this->userId = $userId + 0;
		$this->username = $username;
		$this->imageString = $imageString;
		$this->comment = $comment;
		$this->dateString = $dateString;
		
		$this->commentList = array();
	}
								
	/**
	 * @param UserComment $comment
	 */
	public function addCommentToList(UserComment $comment) {
		$this->commentList[] = $comment;
	}
	
	/**
	 * @param integer $int
	 */
	public function setPostId($int) {
		$this->postId = $int + 0;
	}
	
	/**
	 * @param integer $int
	 */
	public function setUserId($int) {
		$this->userId = $int + 0;
	}
	
	/**
	 * @param string $str
	 */
	public function setUsername($str) {
		$this->headerString = $str;
	}
	
	/**
	 * @param string $str
	 */
	public function setImageString($str) {
		$this->imageString = $str;
	}
	
	/**
	 * @param string $str
	 */
	public function setComment($str) {
		$this->comment = $str;
	}
	
	/**
	 * @param string $str
	 */
	public function setDateString($str) {
		$this->dateString = $str;
	}
	
	/**
	 * @return int
	 */
	public function getPostId() {
		return $this->postId;
	}
	
	/**
	 * @return int
	 */
	public function getUserId() {
		return $this->userId;
	}
	
	/**
	 * @return string
	 */
	public function getUsername() {
		return $this->username;
	}
	
	/**
	 * @return string
	 */
	public function getImageString() {
		return $this->imageString;
	}
	
	/**
	 * @return string
	 */
	public function getComment() {
		return $this->comment;
	}
	
	/**
	 * @return string
	 */
	public function getDateString() {
		return $this->dateString;
	}
	
	/**
	 * @return array UserComment
	 */
	public function getCommentList() {
		return $this->commentList;
	}
}
